package com.qf.sm01.service.impl;/*
 *徐韬
 *2021/10/18
 *19:15
 */

import com.qf.sm01.entity.Student;
import com.qf.sm01.mapper.StudentMapper;
import com.qf.sm01.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.print.DocFlavor;
import java.util.List;
@Service
public class StudentServiceimpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public List<Student> showAll() {
        List<Student> students = studentMapper.showAll();
        return students;
    }

    @Override
    public Student show(Integer stuId) {
        Student student = studentMapper.select(stuId);
        return student;
    }

    @Override
    public int update(Student student) {
        int update = studentMapper.update(student);
        return update;
    }

    @Override
    public List<Student> showBycount(Student student) {
        List<Student> students = studentMapper.selectBycount(student);
        return students;
    }

    @Override
    public int delete(Integer stuId) {
        int delete = studentMapper.delete(stuId);
        return delete;
    }


}
